/**
 * 页码设置
 * @param {*} opt
 */
function scPagenumSetting(opt){
    var com = scCommon.instance();
    var crEle = com.crEle;

    /**
     * 容器
     */
    var box = null;
    var items = [];

    /**
     * 创建视图
     */
    this.createView = function(option){
        box = crEle(null, "sc-pagenum-setting");
        
        option = option ? option : {};
        listener = option.listener;

        var row = null;
        var label = null;
        var input = null;
        var data = opt && opt.data ? opt.data : null;

        var item = null;
        for(var i in items){
            item = items[i];

            row = crEle("div", "sc-pagenum-setting-row");
            label = crEle("label");
            input = crEle("input");
            
            label.innerText = item.label;
            input.type = "text";
            input.name = item.value;
            input.placeholder = item.placeholder;

            if(data && data[input.name] != undefined){
                input.value = data[input.name];
            }

            row.appendChild(label);
            row.appendChild(input);
            box.appendChild(row);
        }

        return box;
    }
}